package com.example.data.factory.common.Dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
public class UpdateScriptDto {
    @ApiModelProperty("脚本id")
    @TableId(value = "script_id", type = IdType.AUTO)
    private Integer scriptId;

    @ApiModelProperty("脚本名称,保证唯一")
    @Pattern(regexp = "^[a-zA-Z\\u4e00-\\u9fa5]+$", message = "脚本名称只能包含中文、英文大小写字母")
    private String scriptName;

    @ApiModelProperty("脚本分类名称")
    private String classifyName;

    @ApiModelProperty("脚本类型，默认python")
    private String scriptType;

    @ApiModelProperty("类名")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_]*$", message = "类名只能包含英文大小写字母、数字及下划线，并且必须以英文开头")
    private String className;

    @ApiModelProperty("函数名")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_]*$", message = "函数名只能包含英文大小写字母、数字及下划线，并且必须以英文开头")
    private String functionName;

    @ApiModelProperty("输入参数")
    private String inputParams;

    @ApiModelProperty("输出参数")
    private String outputParams;

    @ApiModelProperty("脚本描述")
    private String description;
}
